-- GENERATED SPELL FOR [Cursed Marine] --


function spell0_1158(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(3360,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1158', 605, 1)
end

function spell1_1158(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(10651,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1158', 567, 1)
end

function spell2_1158(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(10653,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1158', 643, 1)
end

function Sorts_1158(pUnit, Event)
local choix_sorts_1158 = math.random(0, 2)
if choix_sorts_1158 == 0 then
pUnit:RegisterEvent('spell0_1158', 1, 1)
end
if choix_sorts_1158 == 1 then
pUnit:RegisterEvent('spell1_1158', 1, 1)
end
if choix_sorts_1158 == 2 then
pUnit:RegisterEvent('spell2_1158', 1, 1)
end
end

function mob1158_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1158', math.random(1500, 3000), 1)
end

function mob1158_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1158_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1158_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1158, 1, 'mob1158_Action')
RegisterUnitEvent(1158, 2, 'mob1158_Leave')
RegisterUnitEvent(1158, 3, 'mob1158_Kill')
RegisterUnitEvent(1158, 4, 'mob1158_Die')
